package com.xxq.gulimall.search.controller;

import com.xxq.gulimall.search.entity.BankEntity;
import com.xxq.gulimall.search.service.BankService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/search/bank")
public class BankController {
    @Resource
    private BankService bankService;

    @RequestMapping("/all")
    private Iterable<BankEntity> findAll() {
        return bankService.findAll();
    }

    @RequestMapping("/groupByAge")
    private List<String> groupByAge() {
        return bankService.groupByAge();
    }
}
